#include  "ugen_config.h"//头文件包含必要参数
//////////////////////////

//定义项目拥有的事件和属性
///////////////////////////////////////////////////////////////////////////////属性
#define POWERSTATE "powerstate"//开关
#define FILTERRESETONE "filterResetOne"//滤芯复位1
#define FILTERRESETTWO "filterResetTwo"//滤芯复位2
#define RAWWATERTDS "rawwaterTDS"//原水水质
#define tds "TDS"//总溶解固体值
#define WATERPRODUCINGSTATE "waterProducingState"//制水状态
#define WATERCHANGESTATE "waterChangeState"//换水状态
#define DIYTARGETWATERTIELD "DIYTargetWaterYield"//取水水量
#define CHILDLOCKONOFF "childLockOnOff"//童锁开关
#define WASHINGSWITCH "washingSwitch"//冲洗功能
#define FILTERLIFETIMEONE "filterLifetimeOne"//滤芯寿命_1
#define FILTERLIFETIMETWO "filterLifetimeTwo"//滤芯寿命_2
#define WATEROUTTEMPERATURE "waterOutTemperature"//出水水温
#define PUREFITYWATER "purefityWater"//净水总量
#define GETWATERSWITCH "getwaterSwitch"//取水开关
#define LOCALRECIPE "localRecipe" //本地食谱
#define ERRORCODE "errorCode"//错误码

////////////////////////////////////////////////////////////////////////////////事件
#define FAULTREPORTEVENT "faultReportEvent"//故障上报事件
#define FILTEREXPIRED "filterExpired"//滤芯寿命到期
#define WATERLEVELTOOLOWEVENT "waterLevelTooLowEvent"//水位过低事件
////////////////////////////////////


/////////////////////////////////////////////////////////////////////////////////指令值设定
typedef enum
{
    powerstate = 0x0001,
    filterResetOne,
    filterResetTwo,
    rawwaterTDS,
    TDS,
    waterProducingState,
    waterChangeState,
    DIYTargetWaterYield,
    childLockOnOff,
    washingSwitch,
    filterLifetimeOne,
    filterLifetimeTwo,
    waterOutTemperature,
    purefityWater,
    getwaterSwitch,
    localRecipe = 0x0014,

    Errorcode = 0x0010,
    faultReportEvent,
    filterExpired,
    waterLevelTooLowEvent,
}mcu_up_cmd_action;


/*数据类型:TYPE_INT代表需要传递的值为负值，TYPE_UINT代表传递的为正值；TYPE_BOOL传递的为bool值，double和float看做INT和UINT;
   TYPE_BOOL = 1,
    TYPE_UINT8_T,
    TYPE_UINT16_T,
    TYPE_UINT32_T,
    TYPE_INT8_T = 5,
    TYPE_INT16_T,
    TYPE_INT32_T,
    TYPE_STRING,
    TYPE_EVENT
*/
/*宏定义所有得事件和属性，并以枚举形式定义他们得指令值action,按顺序将属性名和指令一一对应填入currency_config结构体，
（结构体参数，第一个是属性或事件名（字符串），第二个是action,
第三个是属性数值，事件的value初始值设置为TYPE_EVENT属性得value初始值设置为数据类型(正值的设置为TYPE_UINT...,负值设置TYPE_INT...)；
//
将通用协议mcu上报得data传入get_ugen_config_value,会自动提取进行上报；
云端下发将data传入ugen_analysis_cloude_cmd，会自动解析下发*/
//////////////////////////含字符串方案
const ugen_config currency_config[] = {         
    
    ////////////////////////////////////事件；事件放在属性上面
    {FAULTREPORTEVENT,faultReportEvent,TYPE_EVENT},
    {FILTEREXPIRED,filterExpired,TYPE_EVENT},
    {WATERLEVELTOOLOWEVENT,waterLevelTooLowEvent,TYPE_EVENT},
    ////////////////////////////////////////

    //////////////////////////////////////属性
    {POWERSTATE,powerstate,TYPE_BOOL},
    {FILTERRESETONE,filterResetOne,TYPE_BOOL},
    {FILTERRESETTWO,filterResetTwo,TYPE_BOOL},
    {RAWWATERTDS,rawwaterTDS,TYPE_UINT16_T},
    {tds,TDS,TYPE_UINT16_T},
    {WATERPRODUCINGSTATE,waterProducingState,TYPE_BOOL},
    {WATERCHANGESTATE,waterChangeState,TYPE_BOOL},
    {DIYTARGETWATERTIELD,DIYTargetWaterYield,TYPE_UINT16_T},
    {CHILDLOCKONOFF,childLockOnOff,TYPE_BOOL},
    {WASHINGSWITCH,washingSwitch,TYPE_BOOL},
    {FILTERLIFETIMEONE,filterLifetimeOne,TYPE_UINT16_T},
    {FILTERLIFETIMETWO,filterLifetimeTwo,TYPE_UINT16_T},
    {WATEROUTTEMPERATURE,waterOutTemperature,TYPE_UINT16_T},
    {PUREFITYWATER,purefityWater,TYPE_UINT16_T},
    {GETWATERSWITCH,getwaterSwitch,TYPE_BOOL},
    {LOCALRECIPE,localRecipe,TYPE_UINT16_T},
    {ERRORCODE,Errorcode,TYPE_UINT16_T},

    {NULL,NULL,NULL}

};










//////////////////////////////////////////////////////////////////函数ugen_config * get_ugen_config(void)不可随意改动
ugen_config * get_ugen_config(void)
{
    return &currency_config;
}

